package com.example.databean;

import java.io.Serializable;


/**
 * 序列化  可以通过intent传递对象数据
 *  TestBean类去实现了 Serializable接口,这样所有的 Person对象就都是可序列化的了
 * 传递
 * Person person =new Person()
 * person. setname("Tom");
 * person. setage( 20)
 * Intent intent= new Intent(Firstactivity this, Secondactivity. class);
 * intent. putextra(person data person);
 * startactivity(intent);
 *
 * 接收
 * Person person =(Person ) getintent().getser1alizableextra("person data");
 */
public class TestBean implements Serializable {
    private String name;
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
